package com.zjzywl.smoke.repository;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.zjzywl.smoke.entity.Yoy;


@Repository
public interface YoyRepository extends JpaRepository<Yoy,Integer> {
	@Transactional
	@Query(value = "delete from Yoy where type=:type ", nativeQuery = true) 
	@Modifying
	void deleteByType(@Param("type")String type);

	List<Yoy> findByType(String string);

    
}
